package fr.jfc.interfaces;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

import com.minosis.hibernate.Commentaire;
import com.minosis.hibernate.Follower;
import com.minosis.hibernate.Message;
import com.minosis.hibernate.Messageproject;
import com.minosis.hibernate.Projet;
import com.minosis.hibernate.Utilisateur;

import net.sf.hibernate.HibernateException;

public interface UtilitaireI extends Remote {

	public List<Message> getMessageDeUtilisateur(Utilisateur util)
			throws HibernateException, RemoteException;

	public Utilisateur getUtilisateur(String login) throws HibernateException,
			RemoteException;
	
	public Message getMessage(Long idMessage) throws HibernateException,
	RemoteException;

	public List<Utilisateur> getFollower(Utilisateur util)
			throws HibernateException, RemoteException;

	public void updateUtilisateur(Utilisateur user) throws HibernateException,
			RemoteException;

	public void deleteFollowerObject(Follower fol) throws HibernateException, RemoteException;

	public void deleteUtilisateurObject(Utilisateur user)
			throws HibernateException, RemoteException;

	public void deleteMessageObject(Message mess) throws HibernateException, RemoteException;

	public void deleteFollowerRequete(Long iduser_follow, Long iduser_follower)
			throws HibernateException, RemoteException;

	public boolean utilisateurIsEmpty(String login) throws HibernateException,
			RemoteException;

	public boolean checkMdp(String login, String mdp)
			throws HibernateException, RemoteException;

	public void createMessage(Message mess) throws HibernateException, RemoteException;

	public List<Utilisateur> search(String recherche)
			throws HibernateException, RemoteException;

	public void addFollowObject(Follower follow) throws HibernateException, RemoteException;

	public void addFollow(Long iduser_follow, Long iduser_follower)
			throws HibernateException, RemoteException;;
			
	public List<Message> getMessageDesFollowers(Utilisateur util) throws HibernateException, RemoteException;

	public Follower getFollowerWithKey(Long follow, Long follower) throws HibernateException, RemoteException;
	
	public boolean contains(Utilisateur util_follow, Utilisateur util_follower) throws HibernateException, RemoteException;
	
	public Projet getProjet(String nom) throws HibernateException, RemoteException;
	
	public void deleteProjet(Projet proj) throws HibernateException, RemoteException;
	
	public void updateProjet(Projet proj) throws HibernateException, RemoteException;
	
	public List<Utilisateur> getMembre(Projet proj) throws HibernateException, RemoteException;
	
	public List<Utilisateur> getFollowerProjet(Projet proj) throws HibernateException, RemoteException;
	
	public List<Projet> getProjetFollow(Utilisateur user) throws HibernateException, RemoteException;
	
	public List<Projet> getProjetMembre(Utilisateur user) throws HibernateException, RemoteException;
	
	public void SuivreProjet(Long iduser, Long idprojet) throws HibernateException, RemoteException;
	
	public void nePlusSuivre(Long iduser, Long idprojet) throws HibernateException, RemoteException;
	
	public void appartenirProjet(Long iduser, Long idprojet) throws HibernateException, RemoteException;
	
	public void nePlusAppartenir(Long iduser, Long idprojet) throws HibernateException, RemoteException;
	
	public boolean containsMemberProject(Utilisateur user, Projet project) throws HibernateException, RemoteException;
	
	public boolean containsFollowerProject(Utilisateur user, Projet project) throws HibernateException, RemoteException;
	
	public Commentaire getComment(Long idComment) throws HibernateException,RemoteException;
	
	public List<Commentaire> getCommentaire(Message mes) throws HibernateException, RemoteException;
	
	public void deleteCommentaire(Commentaire com) throws HibernateException, RemoteException;
	
	public void addCommentaire(Commentaire com) throws HibernateException, RemoteException;
	
	public void addProject(Projet proj) throws HibernateException, RemoteException;
	
	public List<Messageproject> getMessageProject(Projet proj) throws HibernateException, RemoteException;
	
	public Messageproject getMessageProject(Long idMessage) throws HibernateException,RemoteException;
	
	public void removeMessageProject(Messageproject mess)  throws HibernateException, RemoteException;
	
	public void addMessageProject(Messageproject mess)  throws HibernateException, RemoteException;
	
	public List<Messageproject> getMessageProjectFollow(Utilisateur util) throws HibernateException, RemoteException;
	
	public byte [] imageToByte(String login) throws FileNotFoundException, RemoteException;
	
	public List<Projet> searchProject(String recherche) throws HibernateException, RemoteException;
	
	public void byteToImage(byte [] bytes,String login) throws IOException, RemoteException;
	
	
	
	
}
